Cordova User Defined Plugin Library Manager

Description

The Cordova Builder includes a User Defined Plugin Library Manager that allows the developer to include any plugin that is publicly available from GitHub or NPM.

While Alpha Anywhere includes the ability to add most of the major plugins to any project from within the Cordova App Builder, the list of available Cordova plugins is extensive and dynamic. You may find that you need to use a plugin that is not listed in the Cordova App Builder's 3rd Party Plugins section. With the User Defined Plugin Library Manager, you can build a library of user included plugins for use within any Alpha Anywhere Cordova App. It's easy to add any plugin that you'd like to use with the User Defined Plugin Library Manager.

The Cordova User Defined Plugin Library Manager is accessed by clicking the button labeled Manage My Cordova Plugins from within the Cordova App Builder.

images/pluginManager_img1.png

The Cordova User Defined Plugin Library Manager

The Cordova User Defined Plugin Library Manager allows you to add, edit or delete any publicly available 3rd party Cordova plugin for use within the Cordova App Builder.

images/pluginManager_img2.png

Adding A New Cordova Plugin Definition

The New button allows you to insert a new Cordova Plugin definition. Required fields include the plugin name, a resource or URL link (for GIT installed plugins) and the required repository which may be GIT or NPM.

Optional fields include the help field that will display in the help text area of the Cordova App Builder and the plugin version. If the version field is left blank, the latest plugin version is always loaded with the project.

images/pluginManager_img3.png

Editing An Existing Plugin Definition

The Edit button allows you to edit an existing Cordova Plugin definition. If you make a change to the resource or url link and have installed the older definition of the plugin in any Cordova Build project, the older plugin resource will remain referenced in the Cordova config.xml file. If you need to remove the reference in the Cordova Build config.xml file, you'll need to do that manually. See the instructions below.

images/pluginManager_img4.png

If you define a plugin resource/url that already exists within the Cordova App Builder 3rd Party Plugins list, the user referenced plugin will always take the highest priority. Assuming that the resource/url link is exactly the same as the resource/url link within the Cordova App Builder 3rd Party Plugins list, then the user included plugin will appear with the User Defined Plugins and the built in 3rd party plugin will not appear within the 3rd Party Plugin list.

This allows the developer to easily specify a preferred specific plugin version or repository. In the example below, we are including a definition for the printer plugin, which is already included within the Cordova Builder 3rd Party Plugins.

images/pluginManager_img5.png
images/pluginManager_img6.png
images/pluginManager_img7.png
images/pluginManager_img8.png
images/pluginManager_img9.png

Filtering The Plugin List

If you have included a large number of plugins within the User Defined Cordova Plugin Library, you may find it helpful to use the list filter to help manage the plugin definitions. The filter is keyed on the plugin name. Make sure to clear the filter when it is no longer required.

images/pluginManager_img11.png

Deleting A Plugin Definition From The Plugin List

To delete a User Defined Cordova plugin definition from the list, click on the plugin name in the list and click the delete button. Once confirmed, the plugin definition will be deleted from the User Defined Plugin Manager list. If the plugin has been used in any Cordova App project, the plugin will still be referenced within the project config.xml file. To remove the plugin from the Cordova project, you will need to manually edit the config.xml file and delete the line that references the plugin.

images/pluginManager_img10.png

Editing A Cordova Project config.xml File

From within the Cordova App Builder, click the Save button and click the displayed hyperlink to edit the project's config.xml file. If you have changed the resource/url of a User Defined plugin, you'll see the old and new plugin resource referenced within the project config.xml file. To remove the plugin from the project, delete the line that includes the plugin within the config.xml file and click the Save button.

images/pluginManager_img12.png
images/pluginManager_img13.png